#!/usr/bin/env bash

set -o nounset
set -o errexit
set -o pipefail

STARTUP_DIR="$( cd "$( dirname "$0" )" && pwd )"

source ${STARTUP_DIR}/settings.sh

KUBECTL="kubectl --context=${KUBE_CONTEXT}"

${KUBECTL} create namespace jenkins --dry-run -o yaml|${KUBECTL} apply -f -
${KUBECTL} create secret generic github-credentials --from-literal user=${GITHUB_USER} --from-literal token=${GITHUB_TOKEN} -n jenkins

